<%@page contentType="text/xml"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="se.senai.sgd.negocio.Turmas"%>
<%@page import="se.senai.sgd.entidades.Turma"%>
<%@page import="se.senai.sgd.entidades.Alocacao"%>
<%@page import="com.thoughtworks.xstream.*"%>
<%
        Integer id_turma = Integer.valueOf(request.getParameter("id_turma"));

        Turma turma = Turmas.newInstance().getTurmaById(id_turma);
        XStream xstream = new XStream();

        xstream.alias("turma", Turma.class);
        xstream.alias("alocacao", Alocacao.class);
        String xml = xstream.toXML(turma);
        out.println(xml);
%>